package com.vdf.sisconsolid.persistencemodule.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the net database table.
 * 
 */
@Entity
@Table(name="net")
public class Net implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(nullable=false)
	private Long id;

	@Column(nullable=false, length=20)
	private String name;

	@Column(nullable=false, length=1)
	private String sex;

	@Column(name="years_from")
	private byte yearsFrom;

	@Column(name="years_to")
	private byte yearsTo;

	//bi-directional many-to-one association to Cell
	@OneToMany(mappedBy="net")
	private List<Cell> cells;

	//bi-directional many-to-one association to Consolidation
	@OneToMany(mappedBy="net")
	private List<Consolidation> consolidations;

    public Net() {
    }

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return this.sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public byte getYearsFrom() {
		return this.yearsFrom;
	}

	public void setYearsFrom(byte yearsFrom) {
		this.yearsFrom = yearsFrom;
	}

	public byte getYearsTo() {
		return this.yearsTo;
	}

	public void setYearsTo(byte yearsTo) {
		this.yearsTo = yearsTo;
	}

	public List<Cell> getCells() {
		return this.cells;
	}

	public void setCells(List<Cell> cells) {
		this.cells = cells;
	}
	
	public List<Consolidation> getConsolidations() {
		return this.consolidations;
	}

	public void setConsolidations(List<Consolidation> consolidations) {
		this.consolidations = consolidations;
	}
	
}